<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="csrf-param" content="_homeCSRF">
    <meta name="csrf-token" content="RkJLbXljbG93b3M5JjsZG3MsCidNDg4lISl9DApUKBwCcBgnQCoEXw==">
    <title>社会责任</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="../src/img/favicon.ico" rel="shortcut icon">
    <link href="/images/favicon.ico" rel="bookmark">
    <link href="../src/css/jquery.bxslider.css" rel="stylesheet">
    <link href="../src/iconfonts/iconfont.css" rel="stylesheet">
    <link href="../src/css/bootstrap.css" rel="stylesheet">
    <link href="../src/css/dookayui.css" rel="stylesheet">
    <link href="../src/css/dx.css" rel="stylesheet">
    <link href="../src/css/dy.css" rel="stylesheet">
    <!--[if lte IE9]>
    <script src="../src/js/html5shiv.js"></script>
    <![endif]-->
    <!--[if lte IE9]>
    <script src="../src/js/respond.min.js"></script>
    <![endif]-->

    <link rel="stylesheet" href="../src/css/swiper-4.2.2.min.css">
    <link rel="stylesheet" href="../src/css/special-reset.css">
    <script src="../src/js/jquery-2.1.4.js"></script>
    <script src="../src/js/swiper-4.2.2.min.js"></script>


    <style>
        .swiper-container-horizontal > .swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction {
            bottom: 10px !important;
        }

    </style>

</head>
<body class="bg-gray">

<div class="header"></div>


<div class="container group-news">

    <div class="title mb-5 pengxin-news-title hidden-xs">
        <h2 class="font-20 english-title"></h2>
        <p class="font-20">管理团队</p>
    </div>

    <!-- Swiper -->
    <div class="swiper-container">
        <div class="swiper-wrapper management-banner-one">

        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>

    <div class="swiper-container" style="margin: 50px 0;">
        <div class="swiper-wrapper management-banner-two">

        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>

</div>

<footer class="footer"></footer>
<script>
    var swiper = new Swiper('.swiper-container', {
        zoom: true,
        observer: true,
        observeParents: true,
        autoplay: {
            stopOnLastSlide: false,
        },
        autoplay:false,
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
    });

    $(document).ready(function () {

        $(".header").load("http://192.168.100.181:8080/huoge-edu/public-file/secondMenu-header.html", function () {
            $(".px-mobile .dy-nav .bread").on("click", function () {
                $(".px-mobile .main-nav").slideToggle("slow");
            });
        });
        $(".footer").load("http://192.168.100.181:8080/huoge-edu/public-file/footer.html");
    });


    //获取路由
    function serilizeURL(url) {
        var rs = url.split("?")[1];
        var arr = rs.split("&");
        var json = {};
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].indexOf("=") != -1) {
                json[arr[i].split("=")[0]] = arr[i].split("=")[1];
            }
            else {
                json[arr[i]] = "undefined";
            }
        }
        return json;
    }


    //获取所有panel
    function getFirsrtManagementBanner() {

        var panelLists;
        var panelListsLength;

        var url = location.href;
        var second_id = serilizeURL(url);
        var secondMenuId = second_id.secondMenuId;

        $.ajax({
            url: "http://192.168.100.181:8080/api/banner/" + secondMenuId + "/head-02/10",
            success: function (data) {

                console.log(data)

                panelLists = data.data;
                panelListsLength = panelLists.length;

                for (var i = 0; i < panelListsLength; i++) {
                    $('.management-banner-one').append(`
                        <div class="swiper-slide">
                            <div class="swiper-zoom-container">
                                <img src=${panelLists[i].bannerImg}>
                            </div>
                        </div>
                          `);
                }
            }
        });
    }

    function getSecondManagementBanner() {

        var panelLists;
        var panelListsLength;

        var url = location.href;
        var second_id = serilizeURL(url);
        var secondMenuId = second_id.secondMenuId;

        $.ajax({
            url: "http://192.168.100.181:8080/api/banner/" + secondMenuId + "/head-03/10",
            success: function (data) {

                console.log(data)

                panelLists = data.data;
                panelListsLength = panelLists.length;

                for (var i = 0; i < panelListsLength; i++) {
                    $('.management-banner-two').append(`
                        <div class="swiper-slide">
                            <div class="swiper-zoom-container">
                                <img src=${panelLists[i].bannerImg}>
                            </div>
                        </div>
                          `);
                }
            }
        });

    }

    getFirsrtManagementBanner();
    getSecondManagementBanner();

</script>
</body>
</html>